/* 博客管理样式 */

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: #f8f9fa;
    border-right: 1px solid #e8e8e8;
    padding: 20px 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin: 0;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar a:hover {
    background: #e8f4fd;
    color: #1890ff;
}

.sidebar a.active {
    background: #e8f4fd;
    color: #1890ff;
    border-left-color: #1890ff;
}

.sidebar i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 博客数据统计面板样式 */
.blog-stats-panel {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8e8;
}

.stats-header h2 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.refresh-stats-btn {
    background: #1890ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.refresh-stats-btn:hover {
    background: #40a9ff;
}

.refresh-stats-btn i {
    margin-right: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #1890ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 24px;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.recent-stats {
    background: #f0f8ff;
    border-radius: 8px;
    padding: 20px;
}

.recent-stats h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.recent-label {
    color: #666;
    font-size: 14px;
}

.recent-value {
    font-weight: bold;
    color: #1890ff;
}

/* 内容区域样式 */
.section {
    display: none;
    padding: 20px;
}

.section.active {
    display: block;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8e8;
}

.blog-header h1 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.create-btn {
    background: #1890ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.create-btn:hover {
    background: #40a9ff;
    transform: translateY(-1px);
}

/* 标签页样式 */
.blog-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
}

.tab-btn:hover {
    color: #1890ff;
}

/* 文章列表样式 */
.article-list {
    display: grid;
    gap: 20px;
}

.article-item {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.article-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.article-item h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.article-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.article-excerpt {
    color: #888;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.article-actions {
    display: flex;
    gap: 10px;
}

.article-actions button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.article-actions button:hover {
    background: #f5f5f5;
}

.article-actions button:first-child {
    border-color: #1890ff;
    color: #1890ff;
}

.article-actions button:first-child:hover {
    background: #e8f4fd;
}

.article-item.deleted {
    opacity: 0.6;
    background: #f8f8f8;
}

/* 分类和栏目网格样式 */
.categories-grid,
.columns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.category-card,
.column-card {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.category-card:hover,
.column-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.category-header,
.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-name,
.column-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.category-actions,
.column-actions {
    display: flex;
    gap: 8px;
}

.category-actions button,
.column-actions button {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.category-actions button:hover,
.column-actions button:hover {
    background: #f5f5f5;
}

.category-description,
.column-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.category-stats,
.column-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.category-stat,
.column-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-50px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e8e8e8;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group select[multiple] {
    height: 120px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #1890ff;
    color: white;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e8e8e8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .sidebar ul {
        display: flex;
        overflow-x: auto;
    }
    
    .sidebar li {
        flex-shrink: 0;
    }
    
    .categories-grid,
    .columns-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

/* 评论管理样式 */
.comment-filters {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.filter-btn.active {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

.filter-btn:hover {
    background: #f5f5f5;
}

.filter-btn.active:hover {
    background: #40a9ff;
}

/* 批量操作工具栏 */
.batch-toolbar {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.batch-toolbar span {
    font-weight: 600;
    color: #333;
}

.batch-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #f5f5f5;
}

.btn-danger {
    border-color: #ff4d4f;
    color: #ff4d4f;
}

.btn-danger:hover {
    background: #fff2f0;
}

/* 评论列表样式 */
.comments-container {
    display: grid;
    gap: 15px;
}

.comment-item {
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comment-item.selected {
    border-color: #1890ff;
    background: #f0f8ff;
}

.comment-checkbox {
    position: absolute;
    top: 15px;
    left: 15px;
}

.comment-content {
    margin-left: 30px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-email {
    color: #666;
    font-size: 14px;
    margin-left: 10px;
}

.comment-article {
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
}

.comment-article:hover {
    text-decoration: underline;
}

.comment-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid #e8e8e8;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.comment-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.status-pending {
    background: #fff7e6;
    color: #fa8c16;
}

.status-approved {
    background: #f6ffed;
    color: #52c41a;
}

.status-rejected {
    background: #fff2f0;
    color: #ff4d4f;
}

.status-featured {
    background: #f0f8ff;
    color: #1890ff;
}

.comment-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.comment-actions button {
    padding: 4px 8px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.comment-actions button:hover {
    background: #f5f5f5;
}

.btn-approve {
    border-color: #52c41a;
    color: #52c41a;
}

.btn-reject {
    border-color: #ff4d4f;
    color: #ff4d4f;
}

.btn-feature {
    border-color: #1890ff;
    color: #1890ff;
}

.btn-reply {
    border-color: #fa8c16;
    color: #fa8c16;
}

/* 回复评论模态框 */
.reply-modal .modal-content {
    width: 600px;
}

.reply-form {
    margin-top: 15px;
}

.reply-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 3px solid #e8e8e8;
}

.reply-preview .original-comment {
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
}

.reply-preview .reply-content {
    color: #333;
    font-weight: 600;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 10px;
}

.pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: #f5f5f5;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}